//
//  MCTableBaseMetadata.h
//  GridGovernance
//
//  Created by 吴欧 on 2018/1/19.
//  Copyright © 2018年 Bitvalue. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GDFormModel.h"

@class MCTableBaseCell;
@class MCTableBaseMetadata;

/**
 fillCellMetaDataBlock 不使用表单GDFormModel记录输入数据

 @param cell 某一行cell
 @param metaData cell的数据填充model，记录cell的表达样式及数据
 */
typedef void(^fillCellMetaDataBlock)(MCTableBaseCell *cell, MCTableBaseMetadata *metaData);


/**
 fiterCellModelBlock 使用表单GDFormModel记录输入数据

 @param cell 某一行cell
 @param metaData cell的数据填充model，记录cell的表达样式及数据
 @param formModel 所有cell类型的表单字段model
 */
typedef void(^fiterCellModelBlock)(MCTableBaseCell *cell, MCTableBaseMetadata *metaData, GDFormModel *formModel, NSIndexPath *indexPath);

typedef void (^SelectCellBlock)(MCTableBaseCell *cell, MCTableBaseMetadata *metaData);


typedef void (^getCellHeight)(CGFloat height);


/**
 每行cell的填充数据类
 该model负责给cell设置和填充数据 
 */
@interface MCTableBaseMetadata : NSObject

@property (nonatomic, copy) Class cellClass;
@property (nonatomic, copy) fillCellMetaDataBlock fillCellMetaDataBlock;
@property (nonatomic, copy) fiterCellModelBlock fiterCellModelBlock;
@property (nonatomic, copy) SelectCellBlock selectCellBlock;

@property (nonatomic, copy) getCellHeight heightBlock;

- (CGFloat)cellHeight;
- (fillCellMetaDataBlock)defaultFillCellMetaDataBlock;
- (fiterCellModelBlock)setupFiterCellModelBlock;

- (void)getCellHeightBlock:(getCellHeight)block;

@end
